import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  // 获取租户列表
  SearchTenant: (query) => api.get(`${config.interfaces.type5}portfolio-server/tenant/page-query`, query),
  // 获取机构列表
  getTree: (query) => api.get(`${config.interfaces.type5}portfolio-server/institution/getTree`, query),
  // 获取岗位列表
  SearchStation: (query) => api.get(`${config.interfaces.type5}portfolio-server/station/condition`, query),
  // 获取全部关联组合
  cpTreeDateAll: (query) => api.get(`${config.interfaces.type5}portfolio-server/portfolioInfo/add-for-setting`, query),
  // 根据id获取关联组合
  cpTreeDate: (query) => api.get(`${config.interfaces.type5}portfolio-server/portfolioInfo/query-for-setting`, query),
  // 解锁账户
  unLockUser: (query) => api.post(`${config.interfaces.type2}usermanagement/user/unLockUser`, query),
  // 解冻/冻结账户
  updateActiveState: (query) => api.post(`${config.interfaces.type5}portfolio-server/user/updateActiveState`, query),
  // 重置密码
  resetPassWord: (query) => api.post(`${config.interfaces.type2}usermanagement/user/resetPassWord`, query),
  // 删除用户
  deleteUser: (query) => api.post(`${config.interfaces.type5}portfolio-server/user/remove`, query),
  // 新增用户
  saveTable: (query) => api.post(`${config.interfaces.type5}portfolio-server/user/add`, query),
};
